<?php

namespace app\web\controller;


class Common extends Auth {


    const COMBINE_CONFIG = 1;//获取下单组合上钟类型
    const DATA_MINUS_TYPE = 2;//减免的方式
    const DATA_MINUS_HAND_CARD_TYPE = 3;//手牌类型
    const DATA_MINUS_COMPUTER_TYPE = 4;//计算方式



    /**
     * 获取下拉基础配置
     *
     * @param $type
     */
    public function getConfigList ($type) {

        $list = [];
        switch ($type) {
            case self::COMBINE_CONFIG:
                $list = [['id'=>1,'name'=>'点钟'], ['id'=>2,'name'=>'排钟'], ['id'=>3,'name'=>'加钟'], ['id'=>4,'name'=>'call钟'], ['id'=>5,'name'=>'选钟'],];
                break;
            case self::DATA_MINUS_TYPE:
                $list = [['id'=>1, 'name'=> '按照项目'],['id'=>2,'name'=> '按照金额']];
                break;
            case self::DATA_MINUS_HAND_CARD_TYPE:
                $list = [['id'=>1, 'name'=> '消费手牌'],['id'=>2,'name'=> '男宾手牌'],['id'=>3,'name'=> '女宾手牌'],['id'=>4,'name'=> '儿童手牌'],['id'=>5,'name'=> '其他手牌'],['id'=>6,'name'=> 'viper手牌']];
                break;
            case self::DATA_MINUS_COMPUTER_TYPE:
                $list = [['id'=>1, 'name'=> '按手牌计算单独计算'],['id'=>1, 'name'=> '整单一起计算']];
                break;
            default:
                $list = [];
        }

        $this->result('请求成功', $list, 200);
    }

}